package com.example.demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.example.demo.config.RabbitMQConfig;

public class DemoApplication {

    public static void main(String[] args) throws InterruptedException {
        AnnotationConfigApplicationContext context = 
                new AnnotationConfigApplicationContext(RabbitMQConfig.class);
        
        System.out.println("RabbitMQ消费者已启动，等待消息...");
        
        // 保持主线程运行，让消费者持续监听
        Thread.currentThread().join();
    }
}    